package com.slf.demo.openapi.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author slf
 * @date 2021/8/12
 */
@Data
@Schema(name = "UserVo",description = "用户输出实体")
public class UserVo {
    @Schema(description = "用户名")
    private String userName;
    @Schema(description = "年龄")
    @NotNull
    @Size(min = 1,max = 3)
    private String age;

    @Size(min = 100)
    @NotBlank
    private Long money;
    public UserVo(){}
    public UserVo(String userName,String age){
        this.userName = userName;
        this.age = age;
    }
}
